<!--
 * @description: 标题
 * @Author: Islands
 * @Date: 2024-06-15 12:50:00
 * @LastEditTime: 2024-06-21 21:19:20
-->
<script lang="ts" setup>
import { computed } from "vue";
import { logoProps } from "./props";
const props = defineProps(logoProps);
const emSize = computed(() => {
  return props.size >= 20 ? props.size - 10 : 10;
});
</script>
<template>
  <div
    class="title-box position-relative padding-10"
    style="color: var(--ep-color-primary)"
    :class="props.flex"
    :style="{ textAlign: props.align }"
  >
    <div class="logo">
      <el-image
        class="logo_image shadow"
        :style="{ width: props.logoSize + 'px', height: props.logoSize + 'px' }"
        :src="props.src"
        :preview-src-list="[props.src]"
        fit="cover"
      />
    </div>
    <div class="title" v-show="isTitle">
      <span class="font-bold" :style="{ fontSize: props.size + 'px' }">
        <slot />
      </span>
      <em :style="{ fontSize: emSize + 'px' }">
        <slot name="english" />
      </em>
    </div>
  </div>
</template>
<style lang="scss" scoped>
.title-box {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  .title {
    display: flex;
    flex-direction: column;
    text-align: center;
  }
}

.column {
  flex-direction: column;
}
</style>
